package com.honghu.villagepost.widget;

import android.content.Context;

import androidx.annotation.NonNull;

import com.honghu.villagepost.R;
import com.lxj.xpopup.core.BottomPopupView;

/**
 * @author: mqwang
 * @create: 2/20/21 11:36 AM
 * @Description:
 */
public class SexPopup extends BottomPopupView {

    private Onclick onclick;

    public interface Onclick{
        void first();
        void second();

    }

    public SexPopup(@NonNull Context context, Onclick onclick) {
        super(context);
        this.onclick = onclick;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.popup_select;
    }

    @Override
    protected void onCreate() {
        super.onCreate();

        findViewById(R.id.tv_first).setOnClickListener(v ->{
            onclick.first();
        });

        findViewById(R.id.tv_second).setOnClickListener(v ->{
            onclick.second();

        });

        findViewById(R.id.tv_cancel).setOnClickListener(v ->{
            this.dismiss();
        });

    }
}
